package com.lottery.material.entity.portaluser;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lottery.material.entity.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Description：验证码发送记录表
 * Created by 朱正磊 on 2019-04-09 10:33
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "material_validate_code_record")
public class ValidateCodeRecord extends BaseEntity {

    private static final long serialVersionUID = -7062424144026891023L;

    @Column(columnDefinition = "varchar(20) not null comment '手机号'")
    private String phoneNumber;

    @Column(columnDefinition = "varchar(10) comment '验证码'")
    private String validateCode;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '失效时间'")
    private Date failureTime;

    @Column(columnDefinition = "int(1) comment '发送来源（1：注册；2：登录；3：绑定银行卡-银行预留手机号验证）'")
    private Integer sendSource;

}
